use fw_path prefix when fallback searching for grub config
authorMark Salter <msalter@redhat.com>
Mon, 9 Jan 2023 23:30:39 +0000 (18:30 -0500)
committerFelix Zielcke <fzielcke@z-51.de>
Wed, 11 Jun 2025 15:42:34 +0000 (17:42 +0200)
commit228583b3566d53c3861c9777896462aa9c7603e3
tree0383efb6b0152c5af8d06077aead3b6d4248a0c5
parent3b328c767b26a82d6d7f1d7db6f8dd20926321e4
use fw_path prefix when fallback searching for grub config

When PXE booting via UEFI firmware, grub was searching for grub.cfg in
the fw_path directory where the grub application was found.  If that
didn't exist, a fallback search would look for config file names based
on MAC and IP address.  However, the search would look in the prefix
directory which may not be the same fw_path.  This patch changes that
behavior to use the fw_path directory for the fallback search.  Only if
fw_path is NULL will the prefix directory be searched.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Gbp-Pq: Topic network
Gbp-Pq: Name use-fw_path-prefix-when-fallback-searching-for-grub-config.patch
grub-core/normal/main.c